import React, { Component } from 'react'
import { NavigationScreenConfigProps } from 'react-navigation'
import { Button, View } from 'react-native'

export default class MainScreen extends Component<{} & NavigationScreenConfigProps, {}> {
    static navigationOptions = {
        title: 'Welcome'
    };

    render() {
        const { navigate } = this.props.navigation;

        return (
            <View style={{ flex: 1, borderColor: 'steelblue', borderWidth: 3 }}>
                <Button title="Go to Jane's profile" onPress={() => {
                    navigate('Profile', { name: 'Jane' })
                }}/>
            </View>
        )
    }
}
